package com.linwen.javase.desgin_pattern.structure.proxy.statics;

import com.linwen.javase.desgin_pattern.structure.proxy.Boss;
import com.linwen.javase.desgin_pattern.structure.proxy.Rent;

/**
 * @ClassName StaticProxy
 * @Description 静态代理
 * @Author lin
 * @Date 2022/4/13 下午10:29
 * @Version V1.0
 */
public class StaticProxy implements Rent {
    private Boss boss = new Boss();

    @Override
    public void rent() {
        System.out.println("中介忽悠用户");
        boss.rent();
    }

    @Override
    public void money() {
        System.out.println("中介通知用户要收租了");
        boss.money();
    }
}
